package com.ruoyi.warehouse.controller;

import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

import com.ruoyi.warehouse.domain.*;
import com.ruoyi.warehouse.service.StatisticalAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.warehouse.service.ILlrkIncomingMaterialStorageService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.page.TableDataInfo;

/**
 * 来料统计Controller
 * 
 * @author ruoyi
 * @date 2024-06-25
 */
@RestController
@RequestMapping("/tjfx")
public class StatisticalAnalysisController extends BaseController
{
    @Autowired
    private StatisticalAnalysisService statisticalAnalysisService;

    /**
     * 查询来料统计列表
     */
    @RequiresPermissions("statistical:tjfx:list")
    @GetMapping("/list")
    public TableDataInfo list(LlrkIncomingMaterialStorage llrkIncomingMaterialStorage)
    {
        startPage();
        List<LlslIncomingMaterials> list = statisticalAnalysisService.selectLlrkIncomingMaterialStorageList(llrkIncomingMaterialStorage);
        return getDataTable(list);
    }

    /**
     * 查询产量统计列表
     */
    @RequiresPermissions("statistical:cltj:list")
    @GetMapping("/cltjList")
    public TableDataInfo cltjList(ScgdProductionWorkOrder scgdProductionWorkOrder)
    {
        startPage();
        List<BgdWorkOrderForm> list = statisticalAnalysisService.selectCltjList(scgdProductionWorkOrder);
        return getDataTable(list);
    }

    /**
     * 查询产量统计列表
     */
    @RequiresPermissions("statistical:lltj:list")
    @GetMapping("/lltjList")
    public TableDataInfo lltjList(ScllProductionMaterialRequisition scllProductionMaterialRequisition)
    {
        startPage();
        List<ScllMaterialRequiredRescord> list = statisticalAnalysisService.selectLltjList(scllProductionMaterialRequisition);
        return getDataTable(list);
    }


    /**
     * 查询报工统计列表
     */
    @RequiresPermissions("statistical:bgtj:list")
    @GetMapping("/bgtjList")
    public TableDataInfo bgtjList(BgdWorkOrderForm bgdWorkOrderForm)
    {
        startPage();
        List<BgdWorkOrderForm> list = statisticalAnalysisService.selectBgtjList(bgdWorkOrderForm);
        return getDataTable(list);
    }

    /**
     * 查询报工统计列表
     */
    @RequiresPermissions("statistical:fhtj:list")
    @GetMapping("/fhtjList")
    public TableDataInfo fhtjList(CpProduct cpProduct)
    {
        startPage();
        List<FhslQuantityShipped> list = statisticalAnalysisService.selectFhslQuantityShippedList(cpProduct);
        return getDataTable(list);
    }

}
